package com.gzucm.Scholarship.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gzucm.Scholarship.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@ApiModel
@NoArgsConstructor
@Table(name = "system_value")
public class SystemValue extends BaseEntity {

    @ApiModelProperty(value = "介绍")
    @Column(name = "detail", nullable = true)
    private String detail;

    @ApiModelProperty(value = "变量类型")
    @Column(name = "kind", length = 50, nullable = false)
    private String kind;

    @ApiModelProperty(value = "变量名")
    @Column(name = "code", length = 10, nullable = false)
    private String code;

    @ApiModelProperty(value = "字串值")
    @Column(name = "string_value", nullable = true)
    private String stringValue;

    @ApiModelProperty(value = "时间值")
    @Column(name = "date_value", nullable = true)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateValue;

    @ApiModelProperty(value = "整数值")
    @Column(name = "number_value", nullable = true)
    private Long numberValue;

    @ApiModelProperty(value = "大数值")
    @Column(name = "decimal_value", nullable = true)
    private BigDecimal decimalValue;

}
